<template>
  <div>
    <heads>砍价列表</heads>
    <div class="product bg">
      <div class="product_right" v-for="(itme,index) in getKanjia" :key="index">
        <img :src="itme.pic" alt="" />
        <div class="text">
          <p>{{ itme.name }}</p>
          <p class="characteristic">{{ itme.characteristic }}</p>
          <ol>
            <li>
              <span>￥{{ itme.minPrice }}</span>
              <span>低价</span>
            </li>
            <li>
              <span>￥{{ itme.originalPrice }}</span>
              <span>原价</span>
            </li>
            <li>
              <span>{{ itme.stores }}件</span>
              <span>限量</span>
            </li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import heads from "@/components/Heads";
import { getbanner, getKanjia, news, getgoods } from "@/utils/api/Index.js";
export default {
  components: {
    heads,
  },
  mounted() {
    getKanjia().then((res) => {
      // this.getKanjia = res.data;
      for(let i in res.data.goodsMap) {
        this.getKanjia.push(res.data.goodsMap[i])
      }
    });
  },
  data() {
    return {
      getKanjia: [],
    };
  },
};
</script>

<style lang="scss" scoped>

.product {
    margin-top: 1.4rem;
    border-top: 1px solid #E9E9E9;
}
.product_head {
    height: 0.96rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.product_head span {
    margin-right: 0.24rem;
}
.bg {
    background: #fff;
}
.product div {
    padding: 0.16rem;
}

.product img {
    width: 2rem;
    height: 2rem;
}
.product_right {
    display: flex;
    font-size: 0.24rem;
}
.text {
    padding: 0 !important;
    margin-left: 0.2rem;
}
.characteristic {
    margin-top: 0.24rem;
    color: #ccc;
}
.product_right ol{
    display: flex;
}
.product_right li {
    display: flex;
    flex-direction: column;
    margin-top: 0.76rem;
}
.product_right li:nth-child(n+2){
    margin-left: 0.84rem;
    color: #ccc;
}
.product_right li:nth-child(1) span:nth-child(1){
    font-weight: 900;
    color: red;
}

</style>